FROM ubuntu

RUN apt-get update \
    && apt-get install -y mongodb

# install vim
RUN apt-get install -y vim python git python-pip

RUN git clone https://github.com/grangier/python-goose.git \
    && git clone https://git.oschina.net/tcll/autoscrapy.git \
    && cd python-goose \
    && pip install -r requirements.txt \
    && python setup.py install \
    && pip install flask pymongo requests sqlalchemy

RUN mkdir -p /data/db

COPY run.sh /bin/run
RUN chmod +x /bin/run

CMD ["run"]

